package com.project.xsf.service.impl;

import com.project.junM.entity.TMember;
import com.project.xsf.entity.TInterposeSprot;
import com.project.xsf.mapper.TInterposeSprotMapper;
import com.project.xsf.service.TInterposeSprotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpSession;
import java.util.List;

@Service
@Transactional
public class TInterposeSprotImpl implements TInterposeSprotService {
    @Autowired
    private TInterposeSprotMapper tInterposeSprotMapper;

    @Override
    public List<TInterposeSprot> queryByMemberId(HttpSession session) {
        TMember member = (TMember) session.getAttribute("user");

        return tInterposeSprotMapper.queryByMemberId(member.getId());
    }
}
